#ifndef		HEAP_H
#define		HEAP_H 1

#include	"list.h"

struct		heap
{
  void		*value;
  s_list	*childs;
  struct heap	*parent;
};

typedef struct heap s_heap;
typedef f_list_foreach f_heap_destructor;

s_heap		*heap_add(s_heap *parent, void *value);
void		dsp_heap(s_heap *heap, int depth);
void		destruct_heap(s_heap *heap,
    f_heap_destructor destructor, void *arg);
void		add_node_link(unsigned int idf, unsigned int ids);

#endif
